package main

import "fmt"

func main() {
	//day1.T1()
	//day1.Defer_call()
	//day1.Ap()
	//day1.Equal()
	//day2.Change()
	//fmt.Println(f1())
	//fmt.Println(f2())
	//fmt.Println(f3())
	//f4()
	//f5()
	f6()
}

type Slice []int

func NewSlice() Slice {
	return make(Slice, 0)
}
func (s *Slice) Add(elem int) *Slice {
	*s = append(*s, elem)
	fmt.Print(elem)
	return s
}
func f6() {
	s := NewSlice()
	defer s.Add(1).Add(2)
	s.Add(3)
}
